<!DOCTYPE html>
<html>
<head>
<script>
function run() {
  const params = new URLSearchParams(document.location.search);
  const policy = params.get('policy');
  const destination = params.get('redirect');

  if (policy != "no-meta") {
    const meta = document.createElement("meta");
    meta.name = "referrer";
    meta.content = policy;
    document.head.appendChild(meta);
  }

  const image = document.createElement("img");
  image.src = destination;
  image.onload = function() { document.title = 'loaded'; };
}
</script>
</head>
<body onload="run()">
</body>
</html>
